/*!
    \file    change log.txt
    \brief   change log for GD32E23x firmware

    \version 2026-02-26, V2.6.0, demo for GD32E23x
*/

/*
    Copyright (c) 2026, GigaDevice Semiconductor Inc.

    Redistribution and use in source and binary forms, with or without modification, 
are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice, this 
       list of conditions and the following disclaimer.
    2. Redistributions in binary form must reproduce the above copyright notice, 
       this list of conditions and the following disclaimer in the documentation 
       and/or other materials provided with the distribution.
    3. Neither the name of the copyright holder nor the names of its contributors 
       may be used to endorse or promote products derived from this software without 
       specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
OF SUCH DAMAGE.
*/

******************* V2.6.0 2026-02-26 ************************************************************************************
______________________Common______________________________________________________________________________________________
Fix file:
..\GD32E23x_Firmware_Library\*
fix reason:
Update the firmware library version to v2.5.0.
V2.5.0:
GD32E23x_Firmware_Library v2.4.0
V2.6.0:
GD32E23x_Firmware_Library v2.5.0
Add file:
______________________Common______________________________________________________________________________________________
Fix file:
..\Projects\all demos\GD32EBuilder
fix reason:
Add GD32EBuilder project.
V2.5.0:
none
V2.6.0:
Add GD32EBuilder project.
______________________Common______________________________________________________________________________________________
Fix file:
..\Projects\04_USART_Printf\main.c
..\Projects\05_USART_HyperTerminal_Interrupt\main.c
..\Projects\06_USART_DMA\main.c
..\Projects\13_RCU_Clock_Out\main.c
..\Projects\09_I2C_EEPROM\main.c
..\Projects\10_SPI_Quad_Flash\main.c
fix reason:
Deleted int __io_putchar(int ch) function.
V2.5.0:
#ifdef GD_ECLIPSE_GCC
/* retarget the C library printf function to the usart, in Eclipse GCC environment */
int __io_putchar(int ch)
{
    usart_data_transmit(EVAL_COM, (uint8_t)ch);
    while(RESET == usart_flag_get(EVAL_COM, USART_FLAG_TBE));
    return ch;
}
#else
/* retarget the C library printf function to the usart */
int fputc(int ch, FILE *f)
{
    usart_data_transmit(EVAL_COM, (uint8_t)ch);
    while(RESET == usart_flag_get(EVAL_COM, USART_FLAG_TBE));
    return ch;
}
#endif /* GD_ECLIPSE_GCC */
V2.6.0:
none
______________________gd32e235c_eval.c____________________________________________________________________________________
Fix file:
..\Utilities\gd32e235c_eval.c
fix reason:
Add int __io_putchar(int ch) function.
V2.5.0:
none
V2.6.0:
#if defined(__GNUC__) && !defined(__clang__) /* For GNU GCC compiler */
/* retarget the C library printf function to the USART, in GCC environment */
int __io_putchar(int ch)
{
    usart_data_transmit(EVAL_COM, (uint8_t) ch);
    while(RESET == usart_flag_get(EVAL_COM, USART_FLAG_TBE));
    return ch;
}
#else
/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
    usart_data_transmit(EVAL_COM, (uint8_t)ch);
    while(RESET == usart_flag_get(EVAL_COM, USART_FLAG_TBE));

    return ch;
}
#endif /* defined(__GNUC__) && !defined(__clang__) */
______________________gd32e235c_lcd_eval.c____________________________________________________________________________________
Fix file:
..\Utilities\LCD_Common\lcd_font.h
..\Utilities\LCD_Common\gd32e235c_lcd_eval.c
fix reason:
Compatible with GD32EBuilder engineering projects.
V2.5.0:
#define hz24_num   100
none
V2.6.0:
#define hz24_num   5
        } else {
            for(k = 0; k < hz24_num; k ++) {
                if((hz24[k].Index[0] == *(s)) && (hz24[k].Index[1] == *(s + 1))) {
                    for(i = 0; i < 24; i ++) {
                        for(j = 0; j < 8; j ++) {
                            if(hz24[k].Msk[i * 3] & (0x80 >> j))
                                /* draw a point on the lcd */
                            {
                                lcd_draw_point(x + j, y + i, fc);
                            } else {
                                if(fc != bc)
                                    /* draw a point on the lcd */
                                {
                                    lcd_draw_point(x + j, y + i, bc);
                        }
                        for(j = 0; j < 8; j ++) {
                            if(hz24[k].Msk[i * 3 + 1] & (0x80 >> j))
                                /* draw a point on the lcd */
                            {
                                lcd_draw_point(x + j + 8, y + i, fc);
                            } else {
                                if(fc != bc)
                                    /* draw a point on the lcd */
                                {
                                    lcd_draw_point(x + j + 8, y + i, bc);
                                }
                            }
                        }
                        for(j = 0; j < 8; j ++) {
                            if(hz24[k].Msk[i * 3 + 2] & (0x80 >> j))
                                /* draw a point on the lcd */
                            {
                                lcd_draw_point(x + j + 16, y + i, fc);
                            } else {
                                if(fc != bc)
                                    /* draw a point on the lcd */
                                {
                                    lcd_draw_point(x + j + 16, y + i, bc);
                                }
                            }
                        }
                    }
                }
            }
            s += 2;
            x += 24;
        }
    }
______________________tft_test.c____________________________________________________________________________________
Fix file:
Projects\11_SPI_TFT_LCD_Driver\Soft_Drive\tft_test.c
Projects\07_ADC_Conversion_Triggered_By_Timer\Soft_Drive\tft_test.c
fix reason:
Fix logic BUG 
V2.5.0:
lcd_draw_font_num32(50 + (i % 3) * 40,32 * (i / 3) + 50,WHITE,BLUE,num[i+1]);
V2.6.0:
lcd_draw_font_num32(50 + (i % 3) * 40,32 * (i / 3) + 50,WHITE,BLUE,num[i]);
______________________tft_test.c____________________________________________________________________________________
Fix file:
Projects\07_ADC_Conversion_Triggered_By_Timer\Soft_Drive\tft_test.c
Projects\11_SPI_TFT_LCD_Driver\Soft_Drive\tft_test.c
fix reason:
Delete the display of Chinese characters
V2.5.0:
delay_ms(1000);

/* lcd display Chinese characters */
lcd_clear(BLUE);
lcd_draw_font_gbk16(16,10,WHITE,BLUE,"显示测试");
lcd_draw_font_gbk24(16,30,WHITE,BLUE,"显示测试"); 

lcd_draw_font_gbk16(16,50,WHITE,BLUE,"显示测试");
lcd_draw_font_gbk24(16,70,WHITE,BLUE,"显示测试"); 
V2.6.0:
none
______________________07_ADC_Conversion_Triggered_By_Timer/main.c____________________________________________________________________________________
Fix file:
Projects/07_ADC_Conversion_Triggered_By_Timer/main.c
fix reason:
Fix the initialization BUG
V2.5.0:
none
V2.6.0:
timer_struct_para_init(&timer_initpara);
timer_channel_output_struct_para_init(&timer_ocintpara);
______________________10_SPI_Quad_Flash/main.c____________________________________________________________________________________
Fix file:
Projects/10_SPI_Quad_Flash/main.c
fix reason:
Redundant function declaration
V2.5.0:
void rcc_configuration(void);
void nvic_configuration(void);
V2.6.0:
none


******************* V2.5.0 2025-08-18 ************************************************************************************
______________________Common______________________________________________________________________________________________
Fix file:
..\GD32E23x_Firmware_Library\*
fix reason:
Update the firmware library version to v2.4.0.
V2.3.0:
GD32E23x_Firmware_Library v2.3.0
V2.4.0:
GD32E23x_Firmware_Library v2.4.0


******************* V2.4.0 2025-02-10 ************************************************************************************
______________________Common______________________________________________________________________________________________
Fix file:
..\GD32E23x_Firmware_Library\*
fix reason:
Update the firmware library version to v2.3.0.
V2.3.0:
GD32E23x_Firmware_Library v2.2.0
V2.4.0:
GD32E23x_Firmware_Library v2.3.0

Fix file:
*\EWARM\Project.ewd
*\EWARM\Project.ewd
fix reason:
Update IAR project format(modify default .board/mac/ddf/icf linker path)

Fix file:
.\Utilities\gd32e235c_eval.c
fix reason:
Modified type compatible nvic_irq_enable() function entry.
V2.3.0:
static const uint8_t KEY_IRQn[KEYn]
V2.4.0:
static const IRQn_Type KEY_IRQn[KEYn]

******************* V2.3.0 2024-07-30 ************************************************************************************
______________________Common______________________________________________________________________________________________
Fix file:
..\GD32E23x_Firmware_Library\*
fix reason:
Update the firmware library version to v2.2.0.
V2.2.0:
GD32E23x_Firmware_Library v2.1.0
V2.3.0:
GD32E23x_Firmware_Library v2.2.0
______________________USART______________________________________________________________________________________________
Fix file:
./Projects/04_USART_Printf/main.c
./Projects/05_USART_HyperTerminal_Interrupt/main.c
./Projects/06_USART_DMA/main.c
fix reason:
Add support for printf in GCC.
V2.2.0:
/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
    usart_data_transmit(USART0, (uint8_t) ch);
    while(RESET == usart_flag_get(USART0, USART_FLAG_TBE));
    return ch;
}
V2.3.0:
#ifdef GD_ECLIPSE_GCC
/* retarget the C library printf function to the usart, in Eclipse GCC environment */
int __io_putchar(int ch)
{
    usart_data_transmit(USART0, (uint8_t)ch);
    while(RESET == usart_flag_get(USART0, USART_FLAG_TBE));
    return ch;
}
#else
/* retarget the C library printf function to the usart */
int fputc(int ch, FILE *f)
{
    usart_data_transmit(USART0, (uint8_t)ch);
    while(RESET == usart_flag_get(USART0, USART_FLAG_TBE));
    return ch;
}
#endif /* GD_ECLIPSE_GCC */

Fix file:
./Projects/09_I2C_EEPROM/main.c
./Projects/10_SPI_Quad_Flash/main.c
./Projects/13_RCU_Clock_Out/main.c
fix reason:
Add support for printf in GCC.
V2.2.0:
/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
    usart_data_transmit(EVAL_COM, (uint8_t) ch);
    while(RESET == usart_flag_get(EVAL_COM, USART_FLAG_TBE));
    return ch;
}
V2.3.0:
#ifdef GD_ECLIPSE_GCC
/* retarget the C library printf function to the usart, in Eclipse GCC environment */
int __io_putchar(int ch)
{
    usart_data_transmit(EVAL_COM, (uint8_t)ch);
    while(RESET == usart_flag_get(EVAL_COM, USART_FLAG_TBE));
    return ch;
}
#else
/* retarget the C library printf function to the usart */
int fputc(int ch, FILE *f)
{
    usart_data_transmit(EVAL_COM, (uint8_t)ch);
    while(RESET == usart_flag_get(EVAL_COM, USART_FLAG_TBE));
    return ch;
}
#endif /* GD_ECLIPSE_GCC */
